{%include file="m.index.header.tpl.php"%}
<!--头部 end--> 
<!--主体部分-->
<div class="container" style="margin-top:70px;">
  <div class="row" style="margin-top:10px;">
    <div class="col-sm-12 distance" >
      <div class="form-group">
        <div class="col-xs-12">
        
           <div class="row">
           
              <div class="col-xs-4"> <a href="index.php?a=achieve.list&type=1" {%if $type eq 1 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>集体获奖</a></div>
            <div class="col-xs-4" ><a href="index.php?a=achieve.list&type=2" {%if $type eq 2 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>教师获奖</a></div>
            <div class="col-xs-4"> <a href="index.php?a=achieve.list&type=3" {%if $type eq 3 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>课件获奖</a></div>
          </div><!--row end-->
           
            <div class="row" style="margin-top:25px">
           
           <div class="col-xs-4"><a href="index.php?a=achieve.list&type=4" {%if $type eq 4 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>课例获奖</a></div>
           <div class="col-xs-4"> <a href="index.php?a=achieve.list&type=5" {%if $type eq 5 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>学生获奖</a></div>
           <div class="col-xs-4">  <a href="index.php?a=achieve.list&type=7" {%if $type eq 7 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>指导教师奖</a></div>
           </div><!--row end-->
            <div class="row" style="margin-top:25px">
           <div class="col-xs-4">  <a href="index.php?a=achieve.list&type=6" {%if $type eq 6 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>论文著作</a></div>
           </div><!--row end-->
        
            
          <!--<p class="text-center">
			  <a href="index.php?a=achieve.list&type=1" {%if $type eq 1 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>集体获奖</a>
			  <a href="index.php?a=achieve.list&type=2" {%if $type eq 2 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>教师获奖</a>
		 </p>
		 <p class="text-center">
			  <a href="index.php?a=achieve.list&type=3" {%if $type eq 3 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>课件获奖</a>
			  <a href="index.php?a=achieve.list&type=4" {%if $type eq 4 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>课例获奖</a>
		 </p>
		 <p class="text-center">
			  <a href="index.php?a=achieve.list&type=5" {%if $type eq 5 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>学生获奖</a>
			  <a href="index.php?a=achieve.list&type=7" {%if $type eq 7 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>指导教师奖</a>
		 </p>
		 <p >
			  <a href="index.php?a=achieve.list&type=6" {%if $type eq 6 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>论文著作</a>
		</p>-->
        </div>
      </div>
    </div>
  </div>

  <div class="row" style="margin-right:10%;">
    <div  class="col-xs-sm  text-right" > <a class="btn btn-primary" href="index.php?a=achieve.add&type={%$type%}" style="width:30%">增加</a></div>
  </div>
  <!--row  end-->
 <form name="myform" action="" method="post"> 
  <div class="row" style="margin-top:10px;">
    <div class="col-sm-12 distance" >
      <div class="form-group">
        <label for="inputEmail3" class="col-sm-2 control-label">级别:</label>
        <div class="col-sm-10">
          <select class="form-control" name="prizelv">
			  <option value="all"> 全部 </option>
			  {%foreach from=$prizelv key=key item=value%}
			  <option value="{%$value.prizelv_id%}" {%if $lv eq $value.prizelv_id %}selected{%/if%}> {%$value.prizelv_name%}</option>
			  {%/foreach%}
		  </select>
        </div>
      </div>
    </div>
    <div class="col-sm-12 distance" >
      <div class="form-group">
        <label for="inputEmail3" class="col-sm-2 control-label">获奖名次:</label>
        <div class="col-sm-10">
          <select class="form-control" name="prize">
			  <option value="all"> 全部 </option>
			  {%foreach from=$prize key=key item=value%}
			  <option value="{%$value.prize_id%}" {%if $rank eq $value.prize_id %}selected{%/if%}> {%$value.prize_name%}</option>
			  {%/foreach%}
		  </select>
        </div>
      </div>
    </div>
    <div class="col-sm-12 distance">
      <div class="form-group">
        <label for="" class="col-sm-2 control-label">开始时间:</label>
        <div class="col-sm-10">
          <input type="text" class="form-control" value="{%$from%}" id="from" name="from">
        </div>
      </div>
    </div>
     <div class="col-sm-12 distance">
      <div class="form-group">
        <label for="" class="col-sm-2 control-label">结束时间:</label>
        <div class="col-sm-10">
          <input type="text" class="form-control" value="{%$to%}" id="to" name="to">
        </div>
      </div>
    </div>
    <div class="col-xs-12 distance">
      <div class="form-group  text-center" style="padding-top:0px;">
        <button type="submit" class="btn btn-success absolutely ">搜索</button>
      </div>
    </div>
  </div>
  <div class="row" style="margin-top:15px;margin-left:1px; margin-right:1px;">
  {%foreach from=$achieve_lists key=key item=value%}
    <table class="table table-striped table-bordered text-center"  id="middles">
	{%if $type lt 6 %}
      <tr>
        <td>获奖名称</td>
        <td colspan="2">{%$value.achieve_name%}</td>
      </tr>
      <tr>
        <td>主办单位</td>
        <td colspan="2">{%$value.achieve_unit%}</td>
      </tr>
      <tr>
        <td>级别</td>
        <td colspan="2">{%$value.achieve_lv%}</td>
      </tr>
       <tr>
        <td>名次</td>
        <td colspan="2">{%$value.achieve_rank%}</td>
      </tr>
       <tr>
        <td>获奖者</td>
        <td colspan="2">{%$value.achieve_owner%}</td>
      </tr>
       <tr>
        <td>获奖时间</td>
        <td colspan="2">{%$value.achieve_time%}</td>
      </tr>
	  {%if $type eq 5 %}
	  <tr>
        <td>第一指导老师</td>
        <td colspan="2">{%$value.achieve_teach%}</td>
      </tr>
	  <tr>
        <td>其他指导老师</td>
        <td colspan="2">{%$value.achieve_teachers%}</td>
      </tr>
	  {%/if%}
       <tr>
        <td>备注</td>
        <td colspan="2">{%$value.achieve_remark%}</td>
      </tr>
       <tr>
        <td>附件</td>
        <td colspan="2">
			<a href="upload/achieve_file/{%$value.achieve_file%}" download="" style="color:#666">附件</a>
		</td>
      </tr>
      <tr>
        <td>操作</td>
        <td><a type="button" class="btn btn btn-warning" href="index.php?a=achieve.info&type={%$type%}&achieve_id={%$value.achieve_id%}">查看</a></td>
        <td><a type="button" class="btn btn-danger" href="index.php?a=achieve.update&type={%$type%}&achieve_id={%$value.achieve_id%}">修改</a></td>
      </tr>
    {%/if%}
	{%if $type eq 6 %}
	  <tr>
        <td>获奖名称</td>
        <td colspan="2">{%$value.achieve_name%}</td>
      </tr>
	  <tr>
        <td>出版社</td>
        <td colspan="2">{%$value.achieve_publish%}</td>
      </tr>
	  <tr>
        <td>书号</td>
        <td colspan="2">{%$value.achieve_bookno%}</td>
      </tr>
	  <tr>
        <td>所在页</td>
        <td colspan="2">{%$value.achieve_page%}</td>
      </tr>
	  <tr>
        <td>级别</td>
        <td colspan="2">{%$value.achieve_lv%}</td>
      </tr>
	  <tr>
        <td>发表者</td>
        <td colspan="2">{%$value.achieve_owner%}</td>
      </tr>
	  <tr>
        <td>出版时间</td>
        <td colspan="2">{%$value.achieve_time%}</td>
      </tr>
	  <tr>
        <td>备注</td>
        <td colspan="2">{%$value.achieve_remark%}</td>
      </tr>
	  <tr>
        <td>附件</td>
        <td colspan="2">
			<a href="index.php?a=achieve.file&achieve_id={%$value.achieve_id%}&fname={%$value.achieve_file%}" style="color:#666">{%$value.achieve_fname%}</a>
		</td>
      </tr>
      
      
      <tr>
        <td>操作</td>
        <td><a  class="btn btn btn-warning" href="index.php?a=achieve.info&type={%$type%}&achieve_id={%$value.achieve_id%}">查看</a></td>
        <td><a  class="btn btn-danger" href="achieve.update&type={%$type%}&achieve_id={%$value.achieve_id%}">修改</a></td>
      </tr>
      
     
	{%/if%}
	{%if $type eq 7 %}
	  <tr>
        <td>获奖名称</td>
        <td colspan="2">{%$value.achieve_name%}</td>
      </tr>
	  <tr>
        <td>获奖者</td>
        <td colspan="2">{%$value.achieve_owner%}</td>
      </tr>
	  <tr>
        <td>获奖级别</td>
        <td colspan="2">{%$value.achieve_lv%}</td>
      </tr>
	  <tr>
        <td>第一指导老师</td>
        <td colspan="2">{%$value.achieve_teach%}</td>
      </tr>
	  <tr>
        <td>本人排名</td>
        <td colspan="2">{%$value.achieve_trank%}</td>
      </tr>
	  <tr>
        <td>授奖单位</td>
        <td colspan="2">{%$value.achieve_unit%}</td>
      </tr>
	  <tr>
        <td>获奖时间</td>
        <td colspan="2">{%$value.achieve_time%}</td>
      </tr>
	  <tr>
        <td>备注</td>
        <td colspan="2">{%$value.achieve_remark%}</td>
      </tr>
	  <tr>
        <td>附件</td>
        <td colspan="2">
			<a href="index.php?a=achieve.file&achieve_id={%$value.achieve_id%}&fname={%$value.achieve_file%}" style="color:#666">{%$value.achieve_fname%}</a>
		</td>
      </tr>
      
      
       <tr>
        <td>操作</td>
        <td><a  class="btn btn btn-warning" href="index.php?a=achieve.info&type={%$type%}&achieve_id={%$value.achieve_id%}">查看</a></td>
        <td><a  class="btn btn-danger" href="index.php?a=achieve.update&type={%$type%}&achieve_id={%$value.achieve_id%}">修改</a></td>
      </tr>
      
   
	{%/if%}
    </table>
    
	{%/foreach%}
  </div>
</div>
<!--container  end--> 
<!--主体部分  end--> 
<!--底部-->

{%include file="m.index.footer.tpl.php"%}
<script>
    $(function() {
        $( "#from" ).datepicker({
            defaultDate: "+1w",
            changeMonth: true,
            changeYear: true,
            numberOfMonths:1,
            onClose: function( selectedDate ) {
                $( "#to" ).datepicker( "option", "minDate", selectedDate );
            }
        });
        $( "#to" ).datepicker({
            defaultDate: "+1w",
            changeMonth: true,
            changeYear: true,
            numberOfMonths:1,
            onClose: function( selectedDate ) {
                $( "#from" ).datepicker( "option", "maxDate", selectedDate );
            }
        });
    });
</script>

